﻿Imports System.ComponentModel
Imports Fountainhead.Model

Namespace Controls

    Public Class AdderViewModel
        Inherits BaseControlViewModel
        Public Sub New()
            modelValue = New AdderModel()
            AddHandler Model.PropertyChanged, Sub() OnPropertyChanged(New PropertyChangedEventArgs("Output"))
        End Sub

        Private modelValue As AdderModel
        Public ReadOnly Property Model As AdderModel
            Get
                Return modelValue
            End Get
        End Property
        Public Property InputCurrent1 As Current
            Get
                Return Model.InputCurrent1
            End Get
            Set(ByVal value As Current)
                Model.InputCurrent1 = value
                'OnPropertyChanged(New PropertyChangedEventArgs("Input1"))
            End Set
        End Property

        Public Property InputCurrent2 As Current
            Get
                Return Model.InputCurrent2
            End Get
            Set(ByVal value As Current)
                Model.InputCurrent2 = value
                'OnPropertyChanged(New PropertyChangedEventArgs("Input2"))
            End Set
        End Property

        Public ReadOnly Property OutputCurrent() As Current
            Get
                Return Model.OutputCurrent
            End Get
        End Property
    End Class
End Namespace